/** 
 * @(#)SsoJoinedCallbackImpl.java 2016-1-21
 * 
 * Copyright (c) 1995-2016 Wonders Information Co.,Ltd. 
 * 1518 Lianhang Rd,Shanghai 201112.P.R.C.
 * All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of Wonders Group.
 * (Social Security Department). You shall not disclose such
 * Confidential Information and shall use it only in accordance with 
 * the terms of the license agreement you entered into with Wonders Group. 
 *
 * Distributable under GNU LGPL license by gnu.org
 */

package com.filter;

import javax.servlet.http.HttpServletRequest;

import com.wondersgroup.wssuap.sso.client.SsoJoinedCallback;
import com.wondersgroup.wssuap.sso.credential.Credential;

/**
 * @author xxzx999
 * @version $Revision$ 2016-1-21
 * @author ($Date$ modification by $Author$)
 * @since 1.0
 */
public class SsoJoinedCallbackImpl implements SsoJoinedCallback {

	/** 
	 * @see com.wondersgroup.wssuap.sso.client.SsoJoinedCallback#callback(com.wondersgroup.wssuap.sso.credential.Credential, javax.servlet.http.HttpServletRequest)
	 */
	public void callback(Credential credential, HttpServletRequest request){
		request.getSession().setAttribute("user", credential);
	
		request.getSession().setAttribute("userid", credential.getCredentialCode().toString());
		request.getSession().setAttribute("username", credential.getCredentialName());

		
	}
}
